//导入
import React, { Component } from 'react';
import { Route, NavLink } from 'react-router-dom';
import PropTypes from 'prop-types';


import "./Page2.css";

//组件
class Page2 extends Component {


    static contextTypes = {
        pushNavConfig: PropTypes.func,
        popNavConfig: PropTypes.func,
    };

    configID;

    navConfig = {
        left: "页面1",
        center: "页面2",
        navClass: "page2_nav"
    };

    componentWillMount() {
        this.configID = this.context.pushNavConfig(this.navConfig);
    }

    componentWillUnmount() {
        this.context.popNavConfig(this.configID);
    }

    render() {
        return (
            <fieldset className="page2" >
                <legend>页面2</legend>
                <br />
                <NavLink to={"/"} >跳转到:列表页面</NavLink>
            </fieldset>
        );
    }
}



export  {Page2};